/*
 * TITLE:ResponseBoardAnswer
 * AUTHOR:Manori Thakur
 * PURPOSE: Processes the response to display new question
 */
package clientresponse;

import android.util.Log;
import clientcore.AndroidMain;
import clientcore.Question;
import java.io.IOException;
import java.util.StringTokenizer;
import java.util.Vector;
import java.util.regex.Matcher;
import java.util.regex.Pattern;


public class ResponseBoardQuestion extends ResponseFromServer {
	private static final String TAG = ResponseBoardQuestion.class.getSimpleName();
    private int duration,length;
    private short questionid;
    private String username,lastname;
    public static Question question;

    @Override
    public short process() {
        duration = super.readInt(inFromServer);
        questionid = super.readShort(inFromServer);
        question = new Question(questionid);
        question.setType(super.readShort(inFromServer));
        question.setTopic(super.readString(inFromServer));
        question.setText(super.readString(inFromServer));
        String options = super.readString(inFromServer);
        String status = super.readString(inFromServer);
        
        question.mySetOptions(Question.parseOptions(options));

        return -2;
    }



}
